{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 读取数据和简单的数据探索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib as mpl\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "iris = datasets.load_iris()  # 鸢尾花数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['data', 'target', 'target_names', 'DESCR', 'feature_names'])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Iris Plants Database\n",
      "====================\n",
      "\n",
      "Notes\n",
      "-----\n",
      "Data Set Characteristics:\n",
      "    :Number of Instances: 150 (50 in each of three classes)\n",
      "    :Number of Attributes: 4 numeric, predictive attributes and the class\n",
      "    :Attribute Information:\n",
      "        - sepal length in cm\n",
      "        - sepal width in cm\n",
      "        - petal length in cm\n",
      "        - petal width in cm\n",
      "        - class:\n",
      "                - Iris-Setosa\n",
      "                - Iris-Versicolour\n",
      "                - Iris-Virginica\n",
      "    :Summary Statistics:\n",
      "\n",
      "    ============== ==== ==== ======= ===== ====================\n",
      "                    Min  Max   Mean    SD   Class Correlation\n",
      "    ============== ==== ==== ======= ===== ====================\n",
      "    sepal length:   4.3  7.9   5.84   0.83    0.7826\n",
      "    sepal width:    2.0  4.4   3.05   0.43   -0.4194\n",
      "    petal length:   1.0  6.9   3.76   1.76    0.9490  (high!)\n",
      "    petal width:    0.1  2.5   1.20  0.76     0.9565  (high!)\n",
      "    ============== ==== ==== ======= ===== ====================\n",
      "\n",
      "    :Missing Attribute Values: None\n",
      "    :Class Distribution: 33.3% for each of 3 classes.\n",
      "    :Creator: R.A. Fisher\n",
      "    :Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)\n",
      "    :Date: July, 1988\n",
      "\n",
      "This is a copy of UCI ML iris datasets.\n",
      "http://archive.ics.uci.edu/ml/datasets/Iris\n",
      "\n",
      "The famous Iris database, first used by Sir R.A Fisher\n",
      "\n",
      "This is perhaps the best known database to be found in the\n",
      "pattern recognition literature.  Fisher's paper is a classic in the field and\n",
      "is referenced frequently to this day.  (See Duda & Hart, for example.)  The\n",
      "data set contains 3 classes of 50 instances each, where each class refers to a\n",
      "type of iris plant.  One class is linearly separable from the other 2; the\n",
      "latter are NOT linearly separable from each other.\n",
      "\n",
      "References\n",
      "----------\n",
      "   - Fisher,R.A. \"The use of multiple measurements in taxonomic problems\"\n",
      "     Annual Eugenics, 7, Part II, 179-188 (1936); also in \"Contributions to\n",
      "     Mathematical Statistics\" (John Wiley, NY, 1950).\n",
      "   - Duda,R.O., & Hart,P.E. (1973) Pattern Classification and Scene Analysis.\n",
      "     (Q327.D83) John Wiley & Sons.  ISBN 0-471-22361-1.  See page 218.\n",
      "   - Dasarathy, B.V. (1980) \"Nosing Around the Neighborhood: A New System\n",
      "     Structure and Classification Rule for Recognition in Partially Exposed\n",
      "     Environments\".  IEEE Transactions on Pattern Analysis and Machine\n",
      "     Intelligence, Vol. PAMI-2, No. 1, 67-71.\n",
      "   - Gates, G.W. (1972) \"The Reduced Nearest Neighbor Rule\".  IEEE Transactions\n",
      "     on Information Theory, May 1972, 431-433.\n",
      "   - See also: 1988 MLC Proceedings, 54-64.  Cheeseman et al\"s AUTOCLASS II\n",
      "     conceptual clustering system finds 3 classes in the data.\n",
      "   - Many, many more ...\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(iris.DESCR) # 数据集的描述"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 5.1,  3.5,  1.4,  0.2],\n",
       "       [ 4.9,  3. ,  1.4,  0.2],\n",
       "       [ 4.7,  3.2,  1.3,  0.2],\n",
       "       [ 4.6,  3.1,  1.5,  0.2],\n",
       "       [ 5. ,  3.6,  1.4,  0.2],\n",
       "       [ 5.4,  3.9,  1.7,  0.4],\n",
       "       [ 4.6,  3.4,  1.4,  0.3],\n",
       "       [ 5. ,  3.4,  1.5,  0.2],\n",
       "       [ 4.4,  2.9,  1.4,  0.2],\n",
       "       [ 4.9,  3.1,  1.5,  0.1],\n",
       "       [ 5.4,  3.7,  1.5,  0.2],\n",
       "       [ 4.8,  3.4,  1.6,  0.2],\n",
       "       [ 4.8,  3. ,  1.4,  0.1],\n",
       "       [ 4.3,  3. ,  1.1,  0.1],\n",
       "       [ 5.8,  4. ,  1.2,  0.2],\n",
       "       [ 5.7,  4.4,  1.5,  0.4],\n",
       "       [ 5.4,  3.9,  1.3,  0.4],\n",
       "       [ 5.1,  3.5,  1.4,  0.3],\n",
       "       [ 5.7,  3.8,  1.7,  0.3],\n",
       "       [ 5.1,  3.8,  1.5,  0.3],\n",
       "       [ 5.4,  3.4,  1.7,  0.2],\n",
       "       [ 5.1,  3.7,  1.5,  0.4],\n",
       "       [ 4.6,  3.6,  1. ,  0.2],\n",
       "       [ 5.1,  3.3,  1.7,  0.5],\n",
       "       [ 4.8,  3.4,  1.9,  0.2],\n",
       "       [ 5. ,  3. ,  1.6,  0.2],\n",
       "       [ 5. ,  3.4,  1.6,  0.4],\n",
       "       [ 5.2,  3.5,  1.5,  0.2],\n",
       "       [ 5.2,  3.4,  1.4,  0.2],\n",
       "       [ 4.7,  3.2,  1.6,  0.2],\n",
       "       [ 4.8,  3.1,  1.6,  0.2],\n",
       "       [ 5.4,  3.4,  1.5,  0.4],\n",
       "       [ 5.2,  4.1,  1.5,  0.1],\n",
       "       [ 5.5,  4.2,  1.4,  0.2],\n",
       "       [ 4.9,  3.1,  1.5,  0.1],\n",
       "       [ 5. ,  3.2,  1.2,  0.2],\n",
       "       [ 5.5,  3.5,  1.3,  0.2],\n",
       "       [ 4.9,  3.1,  1.5,  0.1],\n",
       "       [ 4.4,  3. ,  1.3,  0.2],\n",
       "       [ 5.1,  3.4,  1.5,  0.2],\n",
       "       [ 5. ,  3.5,  1.3,  0.3],\n",
       "       [ 4.5,  2.3,  1.3,  0.3],\n",
       "       [ 4.4,  3.2,  1.3,  0.2],\n",
       "       [ 5. ,  3.5,  1.6,  0.6],\n",
       "       [ 5.1,  3.8,  1.9,  0.4],\n",
       "       [ 4.8,  3. ,  1.4,  0.3],\n",
       "       [ 5.1,  3.8,  1.6,  0.2],\n",
       "       [ 4.6,  3.2,  1.4,  0.2],\n",
       "       [ 5.3,  3.7,  1.5,  0.2],\n",
       "       [ 5. ,  3.3,  1.4,  0.2],\n",
       "       [ 7. ,  3.2,  4.7,  1.4],\n",
       "       [ 6.4,  3.2,  4.5,  1.5],\n",
       "       [ 6.9,  3.1,  4.9,  1.5],\n",
       "       [ 5.5,  2.3,  4. ,  1.3],\n",
       "       [ 6.5,  2.8,  4.6,  1.5],\n",
       "       [ 5.7,  2.8,  4.5,  1.3],\n",
       "       [ 6.3,  3.3,  4.7,  1.6],\n",
       "       [ 4.9,  2.4,  3.3,  1. ],\n",
       "       [ 6.6,  2.9,  4.6,  1.3],\n",
       "       [ 5.2,  2.7,  3.9,  1.4],\n",
       "       [ 5. ,  2. ,  3.5,  1. ],\n",
       "       [ 5.9,  3. ,  4.2,  1.5],\n",
       "       [ 6. ,  2.2,  4. ,  1. ],\n",
       "       [ 6.1,  2.9,  4.7,  1.4],\n",
       "       [ 5.6,  2.9,  3.6,  1.3],\n",
       "       [ 6.7,  3.1,  4.4,  1.4],\n",
       "       [ 5.6,  3. ,  4.5,  1.5],\n",
       "       [ 5.8,  2.7,  4.1,  1. ],\n",
       "       [ 6.2,  2.2,  4.5,  1.5],\n",
       "       [ 5.6,  2.5,  3.9,  1.1],\n",
       "       [ 5.9,  3.2,  4.8,  1.8],\n",
       "       [ 6.1,  2.8,  4. ,  1.3],\n",
       "       [ 6.3,  2.5,  4.9,  1.5],\n",
       "       [ 6.1,  2.8,  4.7,  1.2],\n",
       "       [ 6.4,  2.9,  4.3,  1.3],\n",
       "       [ 6.6,  3. ,  4.4,  1.4],\n",
       "       [ 6.8,  2.8,  4.8,  1.4],\n",
       "       [ 6.7,  3. ,  5. ,  1.7],\n",
       "       [ 6. ,  2.9,  4.5,  1.5],\n",
       "       [ 5.7,  2.6,  3.5,  1. ],\n",
       "       [ 5.5,  2.4,  3.8,  1.1],\n",
       "       [ 5.5,  2.4,  3.7,  1. ],\n",
       "       [ 5.8,  2.7,  3.9,  1.2],\n",
       "       [ 6. ,  2.7,  5.1,  1.6],\n",
       "       [ 5.4,  3. ,  4.5,  1.5],\n",
       "       [ 6. ,  3.4,  4.5,  1.6],\n",
       "       [ 6.7,  3.1,  4.7,  1.5],\n",
       "       [ 6.3,  2.3,  4.4,  1.3],\n",
       "       [ 5.6,  3. ,  4.1,  1.3],\n",
       "       [ 5.5,  2.5,  4. ,  1.3],\n",
       "       [ 5.5,  2.6,  4.4,  1.2],\n",
       "       [ 6.1,  3. ,  4.6,  1.4],\n",
       "       [ 5.8,  2.6,  4. ,  1.2],\n",
       "       [ 5. ,  2.3,  3.3,  1. ],\n",
       "       [ 5.6,  2.7,  4.2,  1.3],\n",
       "       [ 5.7,  3. ,  4.2,  1.2],\n",
       "       [ 5.7,  2.9,  4.2,  1.3],\n",
       "       [ 6.2,  2.9,  4.3,  1.3],\n",
       "       [ 5.1,  2.5,  3. ,  1.1],\n",
       "       [ 5.7,  2.8,  4.1,  1.3],\n",
       "       [ 6.3,  3.3,  6. ,  2.5],\n",
       "       [ 5.8,  2.7,  5.1,  1.9],\n",
       "       [ 7.1,  3. ,  5.9,  2.1],\n",
       "       [ 6.3,  2.9,  5.6,  1.8],\n",
       "       [ 6.5,  3. ,  5.8,  2.2],\n",
       "       [ 7.6,  3. ,  6.6,  2.1],\n",
       "       [ 4.9,  2.5,  4.5,  1.7],\n",
       "       [ 7.3,  2.9,  6.3,  1.8],\n",
       "       [ 6.7,  2.5,  5.8,  1.8],\n",
       "       [ 7.2,  3.6,  6.1,  2.5],\n",
       "       [ 6.5,  3.2,  5.1,  2. ],\n",
       "       [ 6.4,  2.7,  5.3,  1.9],\n",
       "       [ 6.8,  3. ,  5.5,  2.1],\n",
       "       [ 5.7,  2.5,  5. ,  2. ],\n",
       "       [ 5.8,  2.8,  5.1,  2.4],\n",
       "       [ 6.4,  3.2,  5.3,  2.3],\n",
       "       [ 6.5,  3. ,  5.5,  1.8],\n",
       "       [ 7.7,  3.8,  6.7,  2.2],\n",
       "       [ 7.7,  2.6,  6.9,  2.3],\n",
       "       [ 6. ,  2.2,  5. ,  1.5],\n",
       "       [ 6.9,  3.2,  5.7,  2.3],\n",
       "       [ 5.6,  2.8,  4.9,  2. ],\n",
       "       [ 7.7,  2.8,  6.7,  2. ],\n",
       "       [ 6.3,  2.7,  4.9,  1.8],\n",
       "       [ 6.7,  3.3,  5.7,  2.1],\n",
       "       [ 7.2,  3.2,  6. ,  1.8],\n",
       "       [ 6.2,  2.8,  4.8,  1.8],\n",
       "       [ 6.1,  3. ,  4.9,  1.8],\n",
       "       [ 6.4,  2.8,  5.6,  2.1],\n",
       "       [ 7.2,  3. ,  5.8,  1.6],\n",
       "       [ 7.4,  2.8,  6.1,  1.9],\n",
       "       [ 7.9,  3.8,  6.4,  2. ],\n",
       "       [ 6.4,  2.8,  5.6,  2.2],\n",
       "       [ 6.3,  2.8,  5.1,  1.5],\n",
       "       [ 6.1,  2.6,  5.6,  1.4],\n",
       "       [ 7.7,  3. ,  6.1,  2.3],\n",
       "       [ 6.3,  3.4,  5.6,  2.4],\n",
       "       [ 6.4,  3.1,  5.5,  1.8],\n",
       "       [ 6. ,  3. ,  4.8,  1.8],\n",
       "       [ 6.9,  3.1,  5.4,  2.1],\n",
       "       [ 6.7,  3.1,  5.6,  2.4],\n",
       "       [ 6.9,  3.1,  5.1,  2.3],\n",
       "       [ 5.8,  2.7,  5.1,  1.9],\n",
       "       [ 6.8,  3.2,  5.9,  2.3],\n",
       "       [ 6.7,  3.3,  5.7,  2.5],\n",
       "       [ 6.7,  3. ,  5.2,  2.3],\n",
       "       [ 6.3,  2.5,  5. ,  1.9],\n",
       "       [ 6.5,  3. ,  5.2,  2. ],\n",
       "       [ 6.2,  3.4,  5.4,  2.3],\n",
       "       [ 5.9,  3. ,  5.1,  1.8]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.data # 数据集，四列代表特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(150, 4)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.data.shape # 150行，4列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['sepal length (cm)',\n",
       " 'sepal width (cm)',\n",
       " 'petal length (cm)',\n",
       " 'petal width (cm)']"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.feature_names # 四列分别代表什么意思"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(150,)"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.target.shape # 目标向量是一维的包含150个元素的向量。对应上150行每一行判断后的鸢尾花类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['setosa', 'versicolor', 'virginica'], \n",
       "      dtype='<U10')"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.target_names # iris.target中的0、1、2分别对应下面的三个元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = iris.data[:,:2] # 去所有的行和前2列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(150, 2)"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIf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SI5g4AGaK5A0CG/h/hewxvv1Pt\nVgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x114e5d160>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[:, 0], X[:, 1]) # 分别取出X中的第1列和第2列的所有元素\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = iris.target\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 5.1,  3.5],\n",
       "       [ 4.9,  3. ],\n",
       "       [ 4.7,  3.2],\n",
       "       [ 4.6,  3.1],\n",
       "       [ 5. ,  3.6],\n",
       "       [ 5.4,  3.9],\n",
       "       [ 4.6,  3.4],\n",
       "       [ 5. ,  3.4],\n",
       "       [ 4.4,  2.9],\n",
       "       [ 4.9,  3.1],\n",
       "       [ 5.4,  3.7],\n",
       "       [ 4.8,  3.4],\n",
       "       [ 4.8,  3. ],\n",
       "       [ 4.3,  3. ],\n",
       "       [ 5.8,  4. ],\n",
       "       [ 5.7,  4.4],\n",
       "       [ 5.4,  3.9],\n",
       "       [ 5.1,  3.5],\n",
       "       [ 5.7,  3.8],\n",
       "       [ 5.1,  3.8],\n",
       "       [ 5.4,  3.4],\n",
       "       [ 5.1,  3.7],\n",
       "       [ 4.6,  3.6],\n",
       "       [ 5.1,  3.3],\n",
       "       [ 4.8,  3.4],\n",
       "       [ 5. ,  3. ],\n",
       "       [ 5. ,  3.4],\n",
       "       [ 5.2,  3.5],\n",
       "       [ 5.2,  3.4],\n",
       "       [ 4.7,  3.2],\n",
       "       [ 4.8,  3.1],\n",
       "       [ 5.4,  3.4],\n",
       "       [ 5.2,  4.1],\n",
       "       [ 5.5,  4.2],\n",
       "       [ 4.9,  3.1],\n",
       "       [ 5. ,  3.2],\n",
       "       [ 5.5,  3.5],\n",
       "       [ 4.9,  3.1],\n",
       "       [ 4.4,  3. ],\n",
       "       [ 5.1,  3.4],\n",
       "       [ 5. ,  3.5],\n",
       "       [ 4.5,  2.3],\n",
       "       [ 4.4,  3.2],\n",
       "       [ 5. ,  3.5],\n",
       "       [ 5.1,  3.8],\n",
       "       [ 4.8,  3. ],\n",
       "       [ 5.1,  3.8],\n",
       "       [ 4.6,  3.2],\n",
       "       [ 5.3,  3.7],\n",
       "       [ 5. ,  3.3],\n",
       "       [ 7. ,  3.2],\n",
       "       [ 6.4,  3.2],\n",
       "       [ 6.9,  3.1],\n",
       "       [ 5.5,  2.3],\n",
       "       [ 6.5,  2.8],\n",
       "       [ 5.7,  2.8],\n",
       "       [ 6.3,  3.3],\n",
       "       [ 4.9,  2.4],\n",
       "       [ 6.6,  2.9],\n",
       "       [ 5.2,  2.7],\n",
       "       [ 5. ,  2. ],\n",
       "       [ 5.9,  3. ],\n",
       "       [ 6. ,  2.2],\n",
       "       [ 6.1,  2.9],\n",
       "       [ 5.6,  2.9],\n",
       "       [ 6.7,  3.1],\n",
       "       [ 5.6,  3. ],\n",
       "       [ 5.8,  2.7],\n",
       "       [ 6.2,  2.2],\n",
       "       [ 5.6,  2.5],\n",
       "       [ 5.9,  3.2],\n",
       "       [ 6.1,  2.8],\n",
       "       [ 6.3,  2.5],\n",
       "       [ 6.1,  2.8],\n",
       "       [ 6.4,  2.9],\n",
       "       [ 6.6,  3. ],\n",
       "       [ 6.8,  2.8],\n",
       "       [ 6.7,  3. ],\n",
       "       [ 6. ,  2.9],\n",
       "       [ 5.7,  2.6],\n",
       "       [ 5.5,  2.4],\n",
       "       [ 5.5,  2.4],\n",
       "       [ 5.8,  2.7],\n",
       "       [ 6. ,  2.7],\n",
       "       [ 5.4,  3. ],\n",
       "       [ 6. ,  3.4],\n",
       "       [ 6.7,  3.1],\n",
       "       [ 6.3,  2.3],\n",
       "       [ 5.6,  3. ],\n",
       "       [ 5.5,  2.5],\n",
       "       [ 5.5,  2.6],\n",
       "       [ 6.1,  3. ],\n",
       "       [ 5.8,  2.6],\n",
       "       [ 5. ,  2.3],\n",
       "       [ 5.6,  2.7],\n",
       "       [ 5.7,  3. ],\n",
       "       [ 5.7,  2.9],\n",
       "       [ 6.2,  2.9],\n",
       "       [ 5.1,  2.5],\n",
       "       [ 5.7,  2.8],\n",
       "       [ 6.3,  3.3],\n",
       "       [ 5.8,  2.7],\n",
       "       [ 7.1,  3. ],\n",
       "       [ 6.3,  2.9],\n",
       "       [ 6.5,  3. ],\n",
       "       [ 7.6,  3. ],\n",
       "       [ 4.9,  2.5],\n",
       "       [ 7.3,  2.9],\n",
       "       [ 6.7,  2.5],\n",
       "       [ 7.2,  3.6],\n",
       "       [ 6.5,  3.2],\n",
       "       [ 6.4,  2.7],\n",
       "       [ 6.8,  3. ],\n",
       "       [ 5.7,  2.5],\n",
       "       [ 5.8,  2.8],\n",
       "       [ 6.4,  3.2],\n",
       "       [ 6.5,  3. ],\n",
       "       [ 7.7,  3.8],\n",
       "       [ 7.7,  2.6],\n",
       "       [ 6. ,  2.2],\n",
       "       [ 6.9,  3.2],\n",
       "       [ 5.6,  2.8],\n",
       "       [ 7.7,  2.8],\n",
       "       [ 6.3,  2.7],\n",
       "       [ 6.7,  3.3],\n",
       "       [ 7.2,  3.2],\n",
       "       [ 6.2,  2.8],\n",
       "       [ 6.1,  3. ],\n",
       "       [ 6.4,  2.8],\n",
       "       [ 7.2,  3. ],\n",
       "       [ 7.4,  2.8],\n",
       "       [ 7.9,  3.8],\n",
       "       [ 6.4,  2.8],\n",
       "       [ 6.3,  2.8],\n",
       "       [ 6.1,  2.6],\n",
       "       [ 7.7,  3. ],\n",
       "       [ 6.3,  3.4],\n",
       "       [ 6.4,  3.1],\n",
       "       [ 6. ,  3. ],\n",
       "       [ 6.9,  3.1],\n",
       "       [ 6.7,  3.1],\n",
       "       [ 6.9,  3.1],\n",
       "       [ 5.8,  2.7],\n",
       "       [ 6.8,  3.2],\n",
       "       [ 6.7,  3.3],\n",
       "       [ 6.7,  3. ],\n",
       "       [ 6.3,  2.5],\n",
       "       [ 6.5,  3. ],\n",
       "       [ 6.2,  3.4],\n",
       "       [ 5.9,  3. ]])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHdxJREFUeJzt3X+MJPV55/H3s92bM8PGEIlR7NtlZ2ydFQkMwWbE7eEo\nQp7JyQZs/5M/OI3PiqVojh7nZJvw43woLLvS/nHyCRM7N8P1OToZzcRW4hDb/PDpsmtHcXSCaBbj\nxUBOImEH2JBjYokl67Vidva5P6qH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d8FPiMmf36EGPpJi/GFOazDnwQWHT3DwA/Bf7TEOLIExJnCvMJgJn9AvBx4E+GFUOInDiHPp9m\n9ktkv8zfA/xL4FIz+2Ts/VQ6uZPd3PvjZnYS+AbwYTNb2rqBu7/p7mdafz8B7DazKwqPlLf/i467\nvw78GXBD2yangCu3PN/XWlaYvBgTmc9XgVfd/anW82+SJdGthj6XBMSZyHxu+CjwtLv/vw7rUpjP\nDV3jTGQ+Z4CX3H3N3d8CHgFubNum7/msdHJ39y+4+z53nyT7v2nfc/cL/gtpZu8yM2v9fQPZnPyk\n6FjN7FIz+8WNv4F/C/y4bbPvAJ9qnUk/QPZ/515LKcYU5tPd/wF4xcx+pbVoGni+bbOhzmVonCnM\n5xb/ju6HOoY+n1t0jTOR+XwZOGBmY61YpoEX2rbpez7rcWItFzO7HcDdHwJ+E2iY2TngZ8Bt3jpd\nXbBfBv6s9b2rA3/k7v+rLdYnyM6ivwicBT6dYIypzOd/BJZb/xf974BPJzaXoXEmMZ+t/5j/BvAf\ntixLbj4D4hz6fLr7U2b2TbJDROeAHwLN2POpK1RFRCqo0odlRERGlZK7iEgFKbmLiFSQkruISAUp\nuYuIVJCSu4hIBSm5i4hUkJK7iEgF/X9eBjCx2D+6ZgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1188836d8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0, 0], X[y==0, 1], color = \"red\") #  X[y==0, 0] 表示对于X中，对于y==0的行取出其第一列。y是目标列，在最后\n",
    "plt.scatter(X[y==1, 0], X[y==1, 1], color = \"blue\") # 颜色千万别写错啊~~\n",
    "plt.scatter(X[y==2, 0], X[y==2, 1], color = \"green\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAAB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/WmOsUwmLsYQxrMLuAhY5+4fAn4L/GUOccRJEmcI4wmAmU0DrgQezCuGJGLizH08zezfEd2Znwm8\nD+gxs+vSPk+pkzvRl3tfaWa7gO8CS8zs/rE7uPshd3+78vtmoNvMTs08Un7/Lzru/jrwD8CCml32\nAWeMWZ5XWZeZuBgDGc9XgVfd/enK8kNESXSs3MeSBHEGMp5VVwDb3P3ABNtCGM+qSeMMZDyXAq+4\n+5C7HwMeBi6p2afp8Sx1cnf3L7r7PHfvJ/rftJ+6+7h/Ic3svWZmld8XEI3JwaxjNbMeM/uj6u/A\nR4DtNbs9Cny68iR9IdH/zr0WUowhjKe77wf2mtkHKqsGgJ01u+U6lknjDGE8x7iGyac6ch/PMSaN\nM5Dx3AMsNLOZlVgGgBdq9ml6PLvSibVYzOx6AHe/B/gksNLMjgO/A672yuPqjM0F/qHyd9cFbHT3\n/1MT62aip+gvAYeBzwYYYyjj+Z+BDZX/RX8Z+GxgY5k0ziDGs/KP+Z8B/2nMuuDGM0GcuY+nuz9t\nZg8RTREdB34FrE97PPUJVRGREir1tIyISLtSchcRKSEldxGRElJyFxEpISV3EZESUnIXESkhJXcR\nkRJSchcRKaH/D4V1nGmGlDkJAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x114f222e8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0,0], X[y==0,1], color=\"red\", marker=\"o\")   # 还可以自己定义散点图的形状\n",
    "plt.scatter(X[y==1,0], X[y==1,1], color=\"blue\", marker=\"+\")\n",
    "plt.scatter(X[y==2,0], X[y==2,1], color=\"green\", marker=\"*\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 换两个维度进行测试\n",
    "X = iris.data[:, 2:] # 这次取后两列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "out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ih1RYqOyPr\nepKIFlc72d23m9lfStom6e/cfXfGpbUsWvZ5lrsfMrM+SQ9J+ki0kFwhmdlHJQ1Jeo27r866nnaZ\n2R5JQ+5e+Fy4md0l6UF3vzO6qXKmu7+QdV1JRavvPi3pHe6e5P6fVxVu5O7uv5D0x6zrSIO7P1Nf\n997d/yTpCRV0wbVoRdBD0du+6FWskcM4ZnaqpL+VdGfWtaDGzOZIeqekjZLk7i+XobFHhiX9b1qN\nXSpgcy8rMxuU9FZJv8q2kvZF0xg7JD0n6cfuXtjPIunLkv5J0rGsC0mBS/qJmW0zs3VZF5PAYkmj\nkr4WTZfdaWazsi4qJZdKujfNE9Lcc8DMZkt6QNK17n4w63ra5e5H3f1M1RaOW25mhZw2M7PVkp5z\n921Z15KSc6J/LhdKujqa2iyiXklvk3S7u79V0v9J+mS2JSUXTS9dLOnbaZ6X5p6xaH76AUmb3f07\nWdeThuh/lX8q6YKsa2nT2ZIujuaqvyXpPDO7J9uS2ufuT0c/n5P0XdUewFNEByQdGPd/hPer1uyL\n7kJJ29392TRPSnPPUPQl5EZJT7j7v2ZdTxJmNs/MBqI//4Wkd0v6TbZVtcfd/8XdT3X3QdX+d/m/\n3P3yjMtqi5nNir6sVzSF8R5JhUyaufvvJe03s9OjTcOSChc+iLFWKU/JSAGrQuaNmd0raZWkuWZ2\nQNJ17r4x26radrakv5f0eDRXLUmfcvetGdbUrpMl3RV96z9D0n3uXugIYUnMl/Td2jhCvZK+6e7/\nkW1JiVwjaXM0lfE7BaxAm2fRf3DfLekfUj930aKQAIDmmJYBgBKiuQNACdHcAaCEaO4AUEI0dwAo\nIZo7AJQQzR0ASojmDgAl9P9cO+ZA00GFdQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x118ac5630>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0,0], X[y==0,1], color=\"red\", marker=\"o\")   # 还可以自己定义散点图的形状\n",
    "plt.scatter(X[y==1,0], X[y==1,1], color=\"blue\", marker=\"+\")\n",
    "plt.scatter(X[y==2,0], X[y==2,1], color=\"green\", marker=\"*\")\n",
    "plt.show() # 这次就区分地比较明显了"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
